const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const Time = require('../public/javascripts/time')
const DataSchema = new Schema({
    dataName: {
        type: String,
        required: true
    },
    children: {
        type:Array
    },
    sort: {
        type: String,
        required: true
    },
    state: {
        type: Number,
        default: 0
    },
    date: {
        type: Date,
        default: new Time().getTime()
    },
})

module.exports = Data = mongoose.model("data", DataSchema);